package com.systemdevelopment.mainproject.View.Visitor;

import com.jfoenix.controls.JFXButton;
import com.systemdevelopment.mainproject.View.mainPaneController;
import com.systemdevelopment.mainproject.View.mainUI;
import com.systemdevelopment.mainproject.View.oneInstanceController;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;

public class  VisitorMenuController extends oneInstanceController {

    @FXML
    private JFXButton gotoBookSearch;
    @FXML
    private JFXButton gotoUserCenter;
    @FXML
    private JFXButton gotoRegister;
    @FXML
    private JFXButton gotoLogin;
    public void closeDrawer()
    {
        ((mainPaneController)oneInstanceController.getController("mainPaneController")).closeDrawer(null);
    }
    @FXML
    private void gotoLoginPane(ActionEvent event) {
        closeDrawer();
        mainUI.loadLoginPane();
    }

    @FXML
    private void gotoRegisterPane(ActionEvent event) {
        closeDrawer();
        mainUI.loadRegisterPane();
    }

    @FXML
    public void gotoBookSearchPane(ActionEvent event) {
        closeDrawer();
        mainUI.loadSearchPane();
    }

    @FXML
    public void gotoUserCenterPane(ActionEvent event) {
        closeDrawer();
        mainUI.loadUserPane();
    }
}

